package Client;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

import javax.swing.JFrame;

public class Main {
	
	//The main method. Starts the main window and initializes a new GamePanel
	public static void main(String[] args)
	{
		JFrame frame = new JFrame("PokemonWorld");
		Socket s;
		try
		{
			s = new Socket ("127.0.0.1", 4444);
			frame.setContentPane(new GamePanel(800, 600, s.getInputStream(), s.getOutputStream()));
		} catch (IOException ex)
		{
			System.out.println("Couldn't connect to server.");
		}
		
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
}
